/*
 * @lc app=leetcode.cn id=1470 lang=javascript
 *
 * [1470] 重新排列数组
 */

// @lc code=start
/**
 * @param {number[]} nums
 * @param {number} n
 * @return {number[]}
 */
var shuffle = function(nums, n) {
  let idx1 = 0, idx2 = nums.length / 2;
  const res = [];
  for(let i = 0; i < nums.length / 2 ; i ++ ) {
    res.push(nums[idx1++], nums[idx2++]);
  }
  return res;
};
// @lc code=end

